import http from "../utils/Http";
import { SSHBaseData } from '../model/SSHModel'
import { SSHSecret } from '../model/SecretModel'

export const sshManageList = () => {
  return http<SSHBaseData[]>({
    method: 'post',
    url: '/sshManage/list'
  })
}

export const addSSH = (data: SSHBaseData) => {
  return http({
    method: 'post',
    url: '/sshManage/add',
    data: data
  })
}

export const deleteSSH = (id:string) => {
  return http({
    method: 'post',
    url: '/sshManage/delete',
    data: { id: id }
  })
}

export const testConn = (data:SSHSecret) => {
  return http({
    method: 'post',
    url: '/sshManage/testConn',
    data: data
  })
}